package com.spring.Controller.Interface;

import com.spring.Entity.UserEntity;
import jxl.read.biff.BiffException;
import org.springframework.ui.Model;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.Map;

/**
 * Created by Arabira on 2016/8/4.
 */
public interface UserController {
    public Map<String, Object> logIn();

    public Map<String, Object> testLogin(UserEntity userEntity, HttpSession session, HttpServletRequest request);

    //public Map<String, Object> logIn(UserEntity userEntity, HttpSession session);
    public Map<String, Object> logOut(HttpSession session, HttpServletRequest httpServletRequest);
    public Map<String, Object> addUserExcel(MultipartFile file, HttpSession session,HttpServletRequest request) throws IOException, BiffException;

    public Map<String, Object> addUser(UserEntity userEntity, HttpServletRequest request);

    public Map<String, Object> updateUser(HttpSession session, String OA, String emailAddress, HttpServletRequest request);

    public Map<String, Object> changePassword(HttpSession session, String oldPassword, String newPassword, HttpServletRequest request);

    public Map<String, Object> findById(HttpSession session, HttpServletRequest request);

    public Map<String, Object> findByUserName(String userName, HttpSession session, HttpServletRequest request);

    public Map<String, Object> findUsersAll(HttpSession session, HttpServletRequest request);

    public Map<String, Object> findReqUsersAll(UserEntity userEntity,HttpSession session, HttpServletRequest request);

    public Map<String, Object> findByUserId(UserEntity userEntity,HttpSession session, HttpServletRequest request);

    public Map<String, Object> updateUserByAdmin(UserEntity userEntity,HttpSession session, HttpServletRequest request);

    public Map<String, Object> deleteByUserId(UserEntity userEntity,HttpSession session, HttpServletRequest request);

    public Map<String, Object> changePassByAdmin(String userId, String newPassword,HttpSession session,  HttpServletRequest request);

    }
